package com.socialrss.accounts.factoryobject;

import android.content.ContentValues;
import android.database.Cursor;

import com.socialrss.accounts.AbstractHolder;

public abstract class AbstractHolderFactory {
	//must be overridden
	/**
	 * It gets cursor as parameter and returns a AbstractHolder object
	 * @param cur
	 * @return
	 */
	public abstract AbstractHolder turnToObj(Cursor cur);
	/**
	 * It gets an AbstractHolder and returns ContentValues object which is
	 * ready to store into DB
	 * @param abs
	 * @return
	 */
	public abstract ContentValues tunToDBInput(AbstractHolder abs);
	/**
	 * It gets an AbstractHolder and some column names.
	 * It returns ContentValues object which has partial values which will be updated
	 * @param abs
	 * @param columns
	 * @return
	 */
	public abstract ContentValues turnToPartialDBInput(AbstractHolder abs, String...columns);
}
